package com.heima.user.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.dtos.UserRelationDto;
import com.heima.user.service.BehaviorUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户关注接口
 */
@RestController
@RequestMapping("/api/v1/user")
public class BehaviorUserController {

    @Autowired
    private BehaviorUserService behaviorUserService;

    /**
     * 用户关注与取消关注
     * @param dto
     * @return
     */
    @PostMapping("/user_follow")
    public ResponseResult collectionBehavior(@RequestBody UserRelationDto dto){

        return behaviorUserService.collectionBehavior(dto);
    }


}
